<!DOCTYPE html>
<html>
    <head>
	<meta charset="utf-8" />
		<link rel="preconnect" href="https://fonts.googleapis.com">
		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
		<link href="https://fonts.googleapis.com/css2?family=Alegreya+Sans&display=swap" rel="stylesheet">
        <script src="javascript.js" defer></script>
        <link rel="stylesheet" href="style.css">
		<link id="theme" rel="stylesheet" href="Themes/green.css">
		<meta name="description" content="A fun clicker game I've been working on to practice coding.">
		<meta name="keywords" content="Clicker,Idle,Incremental,H">
		<meta name="author" content="Muzza">
    </head>
    <body onload="onStart()">
<script src="chs.js"></script>
<script src="core.js"></script>
		<title>H Clicker v0.7</title>
		<div class="split top">
		<table class="mainBar">
			<tr>
				<td class="mainBarTd"><button type="button" class="tallButton" onclick="popupWindow('shortcuts', '1')">Keyboard Shortcuts</button></td>
				<td class="mainBarTd"><button type="button" class="tallButton" onclick="popupWindow('options','1')">Options</button></td>
				<td class="mainDisplay" id="currency"><p>0 Hs<br>0H/s</p></td>
				<td class="mainBarTd"><button type="button" class="tallButton" onclick="popupWindow('hBusiness','1')">H Business</button></td>
				<td class="mainBarTd"><button type="button" class="tallButton" onclick="popupWindow('hMachine','1')">The Machine</button></td>
			</tr>
		</table>
		</div>
		<div class="split middle">
			<img id="hButton" src="Resources/h.png" onclick="increment()" style="touch-action: manipulation;"></button>
			<p id="clickDisplay" class="shopText">0 H/c</p>
			<table id="menuTabs" class="menuTable" style="left:0px;" hidden="hidden">
				<tr>
					<td class="menuTd"><button type="button" class="smallButton menuButton" onclick="switchToUpgrade()">Upgrades</button></td>
					<td class="menuTd"><button type="button" class="smallButton menuButton" onclick="switchToAuto()">Automation</button></td>
				</tr>
			</table>
			<table class="menuTable" style="right:0px;">
				<tr>
					<td class="menuTd"><button type="button" class="smallButton menuButton" onclick="buyMaxButton()">Buy Max</button></td>
				</tr>
			</table>
		</div>
		<div class="split bottom" id="upgrades">
		<table class="hShop">
			<tr>
				<!-- H Shop (H Per Second) -->
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade1" onclick="purchase(1, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade2" onclick="purchase(2, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade3" onclick="purchase(3, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade4" onclick="purchase(4, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade5" onclick="purchase(5, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade6" onclick="purchase(6, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade7" onclick="purchase(7, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade8" onclick="purchase(8, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade9" onclick="purchase(9, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade10" onclick="purchase(10, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade11" onclick="purchase(11, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade12" onclick="purchase(12, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade13" onclick="purchase(13, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade14" onclick="purchase(14, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade15" onclick="purchase(15, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade16" onclick="purchase(16, 1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hUpgrade17" onclick="purchase(17, 1)">Loading...</button></td>
			</tr>
		</table>
		</div>
		<div class="split bottom" id="automation" hidden="hidden">
		<table class="hShop">
			<tr>
				<!-- Hautomation Shop (H Per Second) -->
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade1" onclick="purchaseAuto(1)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade2" onclick="purchaseAuto(2)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade3" onclick="purchaseAuto(3)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade4" onclick="purchaseAuto(4)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade5" onclick="purchaseAuto(5)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade6" onclick="purchaseAuto(6)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade7" onclick="purchaseAuto(7)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade8" onclick="purchaseAuto(8)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade9" onclick="purchaseAuto(9)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade10" onclick="purchaseAuto(10)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade11" onclick="purchaseAuto(11)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade12" onclick="purchaseAuto(12)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade13" onclick="purchaseAuto(13)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade14" onclick="purchaseAuto(14)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade15" onclick="purchaseAuto(15)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade16" onclick="purchaseAuto(16)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade17" onclick="purchaseAuto(17)">Loading...</button></td>
				<td class="hShopTd"><button type="button" class="tallButton bottomStripe" id="hAutoUpgrade18" onclick="purchaseAutoPrestige()">Loading...</button></td>
			</tr>
		</table>
		</div>
		<div id="greyOut1" hidden="hidden" onclick="closeAll()">
		</div>
		<div id="greyOut2" hidden="hidden" onclick="closeAll()">
		</div>
		<div id="hBusiness" hidden="hidden">
		<button type="button" onclick="closeWindow('hBusiness','1')" id="closeButton"></button>
		<table class="hBusinessTable">
			<tr>
				<!-- H Business (H Per Click)-->
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness1" onclick="purchaseBusiness(1)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness2" onclick="purchaseBusiness(2)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness3" onclick="purchaseBusiness(3)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness4" onclick="purchaseBusiness(4)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness5" onclick="purchaseBusiness(5)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness6" onclick="purchaseBusiness(6)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness7" onclick="purchaseBusiness(7)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness8" onclick="purchaseBusiness(8)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness9" onclick="purchaseBusiness(9)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness10" onclick="purchaseBusiness(10)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness11" onclick="purchaseBusiness(11)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness12" onclick="purchaseBusiness(12)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness13" onclick="purchaseBusiness(13)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness14" onclick="purchaseBusiness(14)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness15" onclick="purchaseBusiness(15)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness16" onclick="purchaseBusiness(16)">Loading...</button></td>
				<td class="hBusinessTd"><button type="button" class="tallButton" id="hBusiness17" onclick="purchaseBusiness(17)">Loading...</button></td>
			</tr>
		</table>
		</div>
				<!--- H Machine -->
		<div id="hMachine" hidden="hidden">
			<button type="button" onclick="closeWindow('hMachine','1')" id="closeButton"></button>
			<p class="shopText" style="font-size: 45px; margin: 16px;">Welcome to The Machine</p>
			<p class="shopText" style="font-weight: normal; font-size: 25px; margin: 0px;">Here you can sacrifice all your wealth for the Glod H, you will lose all your progress, but the Glod H will help you rebuild your empire quicker than before.</p>
			<p id="glodCountdown" class="shopText" style="font-size: 25px; margin: 0px;">1000000000 Hs left.</p>
			<button id="resetButton" type="button" class="smallButton shopText" onclick="glodPrestige()">Reset for 0 Glod H</button>
			<p id="glodHDisplay" class="shopText" style="font-size: 30px; margin: 0;">0 Glod H</p>
			<p id="glodHNuggetDisplay" class="shopText" style="font-size: 25px; margin: 0;">0 Glod H Nuggets</p>
			<button type="button" class="smallButton round" style="font-size: 27px;" onclick="popupWindow('glodShop','2')">Glod Shop</button>
		</div>
				<!-- Glod Shop -->
		<div id="glodShop" hidden="hidden">
			<button type="button" onclick="closeWindow('glodShop','2')" id="closeButton"></button>
			<p class="shopText" style="font-size: 45px; margin: 10px;">Glod Shop</p>
			<p id="glodHNuggetDisplay2" class="shopText" style="font-size: 25px; margin: 0px;">0 Glod H Nuggets</p>
			<table>
				<tr>
					<td class="glodShopTd"><span id="mouseOver1"><p>+10% Overall H boost per Glod H</p></span><button id="glodUpgrade1" type="button" class="smallButton round2" onclick="purchaseGlod(1, 'power')">5 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver2"><p>Gain +1 H/c at the start of the game</p></span><button id="glodUpgrade2" type="button" class="smallButton round2" onclick="purchaseGlod(2, 'startingHPC')">15 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver3"><p>Increase glod limit by 10</p></span><button id="glodUpgrade3" type="button" class="smallButton round2" onclick="purchaseGlod(3, 'limit')">50 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver4"><p>Increase glod limit by 30</p></span><button id="glodUpgrade4" type="button" class="smallButton round2" onclick="purchaseGlod(4, 'limit')">100 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver5"><p id="prestigeCount">Increase glod limit by number of presiges (0 prestiges)</p></span><button id="glodUpgrade5" type="button" class="smallButton round2" onclick="purchaseGlod(5, 'conditionalLimit')">250 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver6"><p>+5% Overall H boost per Glod H</p></span><button id="glodUpgrade6" type="button" class="smallButton round2" onclick="purchaseGlod(6, 'power')">300 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver7"><p>Unlock Automation</p></span><button id="glodUpgrade7" type="button" class="smallButton round2" onclick="purchaseGlod(7, 'unlock')">500 Glod Nuggets</button></td>
					<td class="glodShopTd"><span id="mouseOver8"><p>Unspent Glod H Nuggets boost Glod H boost</p></span><button id="glodUpgrade8" type="button" class="smallButton round2" onclick="purchaseGlod(8, 'unlock')">1,000 Glod Nuggets</button></td>
				</tr>
				<tr>
					<td class="glodShopTd"><span id="mouseOver9"><p>Increase glod limit by number of prestiges*9</p></span><button id="glodUpgrade9" type="button" class="smallButton round2" onclick="purchaseGlod(9, 'conditionalLimit')">2,000 Glod Nuggets</button></td>
				</tr>
			</table>
		</div>
				<!-- Options Menu -->
		<div id="options" hidden="hidden">
			<button type="button" onclick="closeWindow('options','1')" id="closeButton"></button>
			<p class="shopText" style="font-size: 45px; margin: 16px;">Options</p>
			<table>
				<tr>
					<td class="optionsTd"><button id="themeDisplay" type="button" class="smallButton optionsButton" onclick="changeTheme(1)">Theme: Default</button></td>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="save()">Save</button></td>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="load()">Load</button></td>
				</tr>
				<tr>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton"><span id="tickDisplay">Tickspeed (40)</span>
						<div class="slidecontainer">
							<input type="range" min="5" max="75" value="40" class="slider" id="tickSlider" oninput="updateSlider()">
						</div>
						</button>
					</td>
					<td class="optionsTd"><button id="offlineOption" type="button" class="smallButton optionsButton" onclick="toggleOffline()">Offline progress: ON</button></td>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="autoChange()"><span id="autoSaveDisplay">Autosave: ON (60s)</span>
						<div class="slidecontainer">
							<input type="range" min="1" max="120" value="60" class="slider" id="autoSlider" onclick="autoChange()" oninput="autoSave()">
						</div>
						</button>
					</td>
				</tr>
				<tr>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="importSave()">Import</button></td>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="popupWindow('confirmation', '2')">RESET</button></td>
					<td class="optionsTd"><button type="button" class="smallButton optionsButton" onclick="exportSave()">Export</button></td>
				</tr>
			</table>
		</div>
				<!-- Confirmation Screen -->
		<div id="confirmation" hidden="hidden">
			<p class="shopText" style="font-size:40px;margin:10px;">Are you sure?</p>
			<button type="button" class="smallButton confirmButton" onclick="resetAll()">Yes</button>
			<button type="button" class="smallButton denyButton" onclick="closeWindow('confirmation', '2')">No</button>
		</div>
				<!-- Shortcuts Menu -->
		<div id="shortcuts" hidden="hidden">
			<button type="button" onclick="closeWindow('shortcuts','1')" id="closeButton"></button>
			<table class="shortcutsTable" style="width:100%;border:10px solid black;">
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Click the H</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">H</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Buy Max</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:25px;padding:0px;margin:0px;">M</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Save Game</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">S</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Close Menu</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Esc/1</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Open H Business</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:25px;padding:0px;margin:0px;">2</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Open The Machine</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:25px;padding:0px;margin:0px;">3</p></td>
				</tr>
				<tr>
					<td class="shortcutsTd"><p class="shopText" style="font-size:30px;padding:0px;margin:0px;">Change themes</p></td>
					<td class="shortcutsTd"><p class="shopText" style="font-size:25px;padding:0px;margin:0px;">Left arrow/Right arrow</p></td>
				</tr>
				
			</table>
		</div>
				<!-- Offline Progress Popup -->
		<div id="offlinePopup" hidden="hidden">
			<button type="button" onclick="closeWindow('offlinePopup','1')" id="closeButton"></button>
			<br>
			<p id="offlineTime" class="shopText" style="font-size: 40px;">You've been offline for 00:00:00</p>
			<p id="offlineGain" class="shopText" style="font-size: 35px;">At 0 HPS, you earned 0 H</p>
		</div>
<!--客服 开始-->
<script src="//g8hh.github.io/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="//g8hh.github.io/static/css/kf.css" type="text/css" media="screen" charset="utf-8">
<script src="//g8hh.github.io/static/js/kf.js"></script>
<!-- 客服 结束 -->
<!--站长统计-->
    <div style="display: none">
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?6581389daf4dd6fe7dbb4d20fdcb52a6";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
    </div>
	</body>
</html>